/*!
 * SPDX-License-Identifier: Apache-2.0
 *
 * The OpenSearch Contributors require contributions made to
 * this file be licensed under the Apache-2.0 license or a
 * compatible open source license.
 *
 * Modifications Copyright OpenSearch Contributors. See
 * GitHub history for details.
 */

.ouiMarkdownEditorTextArea {
  @include ouiFormControlText;
  @include ouiScrollBar;
  width: 100%;
  height: 100%;
  min-height: $ouiMarkdownEditorMinHeight;
  padding: $ouiSizeM;
  border: $ouiBorderThin;
  border-bottom: none;
  // Overrides the ouiFormControlText line-height that is very small
  line-height: $ouiLineHeight;
  resize: vertical;
  background-color: $ouiFormBackgroundColor;
  background-repeat: no-repeat;
  background-size: 0% 100%;
  // Removes default firefox margin
  margin: 0;

  // sass-lint:disable-block indentation
  transition:
    box-shadow $ouiAnimSpeedFast ease-in,
    background-image $ouiAnimSpeedFast ease-in,
    background-size $ouiAnimSpeedFast ease-in,
    background-color $ouiAnimSpeedFast ease-in;

  &:focus,
  // preventing the text area of loosing focus when clicking on an action button
  // from the toolbar
  .ouiMarkdownEditor:focus-within &  {
    background-color: tintOrShade($ouiColorEmptyShade, 0%, 40%);
    background-image: ouiFormControlGradient();
    background-size: 100% 100%;
  }
}
